var arr = [
    {x:-64, s:.83, z: 1},
    {x:140, s: 1, z: 2},
    {x:338, s:.83, z: 1},
    {x:960, s:.83, z: 1},
    {x:960, s:.83, z: 1},
    {x:960, s:.83, z: 1},
]
function render()
{
    var swiperObjs = document.querySelectorAll('.swiper .swiper-slide')
    swiperObjs.forEach(function(item, i){
        item.style.transform = 'translateX('+arr[i].x+'px) scale('+arr[i].s+')'
        item.style.zIndex = arr[i].z
    })
}
render()
function next(){
    var temp=arr.pop()
    arr.unshift(temp)
    render()
}
function prev(){
    var temp=arr.shift()
    arr.push(temp)
    render()
}
var xyz=document.querySelector('.swiper .swiper-next')
xyz.onclick=function(){
    next()
}
var syz=document.querySelector('.swiper .swiper-prev')
syz.onclick=function(){
    prev()
}
var swiperObjs = document.querySelectorAll('.swiper .swiper-slide')
swiperObjs.forEach(function(item){
    item.onclick=function(){
        var style=item.style.transform
        if(style.indexOf('64px')!=-1)prev()
        if(style.indexOf('338px')!=-1)next()
    }
})